import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import Select from "@feidao/widgets/fd-w000004";

export default async function a033(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	const v = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="fd-w000004-004"]').value;
	if (!v) {
		alert('请输入设置日期值');
	} else {
		const w = fd.data.node.querySelector<Select>('[data-feidao-id="fd-w000004-001"]');
		const d = v.split(',').map((item) => {
			return Number(item);
		});
		w.set_value(d);
	}
	fd.data.node.querySelector<HTMLAreaElement>('[data-feidao-id="fd-w000004-003"]').innerHTML = `
const v = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="fd-w000004-004"]').value;
if (!v) {
	alert('请输入设置日期值');
} else {
	const w = fd.data.node.querySelector<Select>('[data-feidao-id="fd-w000004-001"]');
	const d = v.split(',').map((item) => {
		return Number(item);
	});
	w.set_value(d);
}
	`;
}
